<template>
    <a :href="props.data.url" target="_blank" class="nav-item" :title="props.data.desc">
        <img :src="props.data.url + '/favicon.ico'" :alt="props.data.name">
        <span>{{ props.data.name }}</span>
    </a>
</template>

<script setup lang="ts">
const props = defineProps<{ data: NavigationModel }>()
</script>

<style lang="scss" scoped>
.nav-item {
    padding: 6px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;

    img {
        width: 18px;
        height: 18px;
        border-radius: 4px;
    }

    &:hover,
    &:focus {
        //transform: translateY(-3px);
        transform: scale(1.1);
        box-shadow: var(--el-box-shadow);
    }

    span {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
</style>